package com.cswangdao.mapper;

import com.cswangdao.domain.dto.TopicPageDTO;
import com.cswangdao.domain.model.MarketTopic;
import com.github.pagehelper.Page;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface MarketTopicMapper {

    Page<MarketTopic> pageQueryInfo(TopicPageDTO pageDTO);

    MarketTopic queryById(String id);

    void updateById(MarketTopic topic);

    void addTopic(MarketTopic topic);

    @Delete("delete from market_topic where id = #{id}")
    void deleteById(Integer id);

    void batchDelete(List<Integer> ids);

    List<MarketTopic> getAll(@Param("limit") Integer limit);
}